
<?php
	if(empty($this->stream['data'])) echo 'no user following/followed for user.';
	else {
?>		
	
	
		<ol class="statuses">
	<?php
	
	//we put a baseURL for athors (often used)
	$authorBaseURL = $this->baseURL().'/status/user/';
	
	foreach($this->stream['data'] as $mun=> $userDetails) {
	?>
	<li class="status" id="status<?php echo $userDetails['user']['id'] ?>">
		

		<span class="followStatus">
			<?php 
				//Following status
				if('you' === $userDetails['isFollowed']) echo 'it\'s you';
				elseif($userDetails['isFollowed']) echo '<a href="'.$this->baseURL().'/status/friendship/delete/pseudo/'.$userDetails['user']['pseudo'].'/">Unfollow</a>';
				else echo '<a href="'.$this->baseURL().'/status/friendship/create/pseudo/'.$userDetails['user']['pseudo'].'/">Follow</a>';
			?>
		</span>
		
		
		<a href="<?php echo $authorBaseURL.$userDetails['user']['pseudo'].'/' ?>"><img src="<?php echo $this->avatarBaseURL.$userDetails['user']['pseudo'].'.gif' ?>" class="avatarImage" alt="<?php echo $userDetails['user']['pseudo'] ?>" width="44px" height="44px"  /></a>
		<div class="details">
			<span class="author"><a href="<?php echo $authorBaseURL.$userDetails['user']['pseudo'].'/' ?>"><?php echo $userDetails['user']['pseudo'] ?></a></span>	
		</div>
	
		<?php
		if(true === $userDetails['isFollowed']) echo '<span class="following">following</span>';
		?>

	</li>
	
	<?php	
	} //end foreach user
		
	?>
	
	</ol> 
			
<?php		
	} //end users to display

		
?>

